import redis
import struct
import sys

r = redis.Redis()

x = r.lrange('sz300012.day', 0, 0)[0] 
y = struct.pack('LLLLLfLi',*eval(x))


file = open('tmp','w')
file.write(y)